package cn.itcast.bassm.util;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;

public class readTxT {
	
    public static String readTxtLine(String txtPath, int lineNo) {
    	 
        String line = "";
        String encoding="GBK";
        try {
            File txtFile = new File(txtPath);
            InputStream in = new FileInputStream(txtFile);
            InputStreamReader read = new InputStreamReader(in,encoding);
            BufferedReader reader = new BufferedReader(read);
            int i = 0;
            while (i < lineNo) {
                line = reader.readLine();
                i++;
            }
            reader.close();
        } catch (Exception e) {
            
        }
         
        return line;
    }
}
